﻿<%@ Page Language="C#" MasterPageFile="~/Hospitals/Master/HospitalsMaster.Master"
    AutoEventWireup="true" CodeBehind="PurchaseOrderUpdate.aspx.cs" Inherits="HZ.DrugTrade.Web.Hospitals.Procurement.PurchaseOrderUpdate"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="maincon">
        <div class="note">
            采购单基本信息
        </div>
        <div class="note2">
        </div>
        <table>
            <tr>
                <th style="width: 100px;">
                    <asp:Label ID="lblPurchaseOrderName" runat="server" Text="采购单名称："></asp:Label>
                </th>
                <td align="center">
                    <asp:Label runat="server" ID="lblPurseOrder"></asp:Label>
                </td>
                <th style="width: 100px;">
                    <asp:Label ID="lblAmount" runat="server" Text="采购单总额："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtAmount" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th style="width: 100px;">
                    <asp:Label ID="lblPerson" runat="server" Text="制单人："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtPerson" runat="server"></asp:Label>
                </td>
                <th style="width: 100px;">
                    <asp:Label ID="lblStatus" runat="server" Text="采购单状态："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtStatus" runat="server"></asp:Label>
                </td>
            </tr>

            <tr>
                <th style="width: 100px;">备注：
                </th>
                <td colspan="3">
                    <asp:Label ID="lblReadme" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div id="tabcontent2">
        <table class="querylist">
            <tr>
                <td align="right">产品名称：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtGoodsName" runat="server"></asp:TextBox>
                </td>
                <td align="right">规格型号：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtOutLookc" runat="server"></asp:TextBox>
                </td>
                <td align="right">最小计量单位：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtUnit" runat="server"></asp:TextBox>
                </td>
                <td rowspan="2">
                    <hz:HzButton ID="btnQuery" runat="server" CssClass="btn" Text="单内查询" OnClick="btnQuery_Click" />
                </td>
            </tr>
            <tr>
                <%-- <td align="right">
                    拼音码：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtPinyinCode" runat="server"></asp:TextBox>
                </td>--%>
                <td align="right">生产企业：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtCompany_SC" runat="server"></asp:TextBox>
                </td>
                <td align="right">配送企业：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtCompany_PS" runat="server"></asp:TextBox>
                </td>
                <td align="right">拼音码：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtpinyincode" runat="server"></asp:TextBox>
                            </td>
                
            </tr>
            <tr>
                <td align="right">
                    <asp:Label Text="项目：" ID="lblProjectid" runat="server" />
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlProjectid" runat="server">
                        <asp:ListItem Value="0002">2014年内蒙古自治区网上高值医用耗材阳光采购项目</asp:ListItem>
                        <asp:ListItem Value="0001">2012年内蒙古自治区网上医用耗材采购项目</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwPurchaseOrderDetail" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="ProcureCatalogID,CompanyID_PS,OrderDetailID" EmptyDataText="无产品明细！"
        OnRowDataBound="gvwPurchaseOrderDetail_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="数量">
                <ItemTemplate>
                    <asp:TextBox ID="txtCount" runat="server" Width="40px" oncontextmenu="javascript:return false;"
                        onblur="javascript:return check_isnum();" onkeydown="javascript:return check_isnum();"
                        MaxLength="5" ToolTip="整数类型(格式如10)" Text='<%# Eval("PurchaseCount") %>'></asp:TextBox>
                    <asp:Label ID="lblCount" runat="server" Width="40px" Text='<%# Eval("PurchaseCount") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购限价">
                <ItemTemplate>
                    <asp:Label ID="lblProcurePrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("ProcurePrice")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <%--仅供数据导出使用 --%>
            <asp:BoundField DataField="PurchaseCount" HeaderText="数量" Visible="false" />
            <%--仅供数据导出使用 --%>
            <asp:BoundField DataField="Price" HeaderText="采购价" DataFormatString="{0:F}" Visible="false" />
            <%--<asp:BoundField DataField="ProcurePrice" HeaderText="采购限价" DataFormatString="{0:F}" />--%>
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" />
            <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <%--<asp:BoundField DataField="Factor" HeaderText="转换系数" />--%>
            <asp:BoundField DataField="Unitcount" HeaderText="最小计价单位" />
            <asp:BoundField DataField="QualityLevel" HeaderText="产品类别" />
            <asp:BoundField DataField="CompanyName_SC_tb" HeaderText="生产企业(代理)" />
            <asp:BoundField DataField="CompanyName_PS" HeaderText="配送企业" />
            <%--<asp:TemplateField HeaderText="产品属性">
                <ItemTemplate>
                    <%# HZ.DrugTrade.Web.Function.FormatDrugSource( Eval("SortSource")) %>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>--%>
            <asp:BoundField DataField="orderdetailstatedc" HeaderText="配送状态" />
            <%-- <asp:TemplateField HeaderText="配送状态">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="ltlOrderDetailState" Text='<%# Eval("OrderDetailState") %>'></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this, 'ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail', 'addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="checkbox1" id="checkbox1" value='<%#Eval("OrderDetailID")%>'
                        onclick="chkChecked(this, 'ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail', 'addTable_chkAll');"
                        runat="server" />
                </ItemTemplate>
                <HeaderStyle Width="25px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>说明：<span>先选中需要操作的明细，然后再进行相应的操作。</span></li>
            <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                数据修改并保存修改后，您可以提交采购单，提交后将不能再进行更改！</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="添加产品" CssClass="btn" OnClick="btnAdd_Click"
            OperateType="编辑" ToolTip="添加新的产品明细" />
        <hz:HzButton ID="btnModCnt" runat="server" Text="保存修改" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail','请至少选定一个采购明细！')) {return confirm('确实要更改选定的采购明细？');}return false;"
            CssClass="btn" OnClick="btnModCnt_Click" OperateType="编辑" ToolTip="保存修改的信息" />
        <hz:HzButton ID="btnDel" runat="server" Text="删除产品" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail','请至少选定一个采购明细！')) {return confirm('确实要删除选定的采购明细？');}return false;"
            CssClass="btn" OnClick="btnDel_Click" OperateType="删除" ToolTip="删除所选的明细" />
        <hz:HzButton ID="btnSubmit" runat="server" Text="提交采购单" CssClass="btn" OnClientClick="return confirm('您确定已完成本采购单的制定，提交后将不可再进行修改，确定现在提交？')"
            OnClick="btnSubmit_Click" ToolTip="将此采购单提交给配送商" OperateType="提交" />
        <hz:HzButton ID="btnDelOrder" runat="server" CssClass="btn" OnClick="btnDelOrder_Click"
            Text="删除采购单" OnClientClick="return confirm('确定要删除这个采购单及所有相关明细吗？')" ToolTip="将此采购单及所有相关明细删除"
            OperateType="删除" />
        <%--<hz:HzButton ID="btnDrop" runat="server" CssClass="btn" 
          Text="撤回采购单" OnClientClick="return confirm('确定要撤回这个采购单及所有相关明细吗？')" 
            ToolTip="将此采购单及所有相关明细撤回" onclick="btnDrop_Click"
        />--%>
        <hz:HzButton ID="btnExport" runat="server" CssClass="btn"
            Text="导出Excel" ToolTip="将数据导出为Excel文件" OnClick="btnExport_Click" />
    </div>
</asp:Content>
